--[[ 编码: JX-83-10 名称: 容器料格-自定义表单-选货品前 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: BeforeSelectGood 功能: 弹出货品查询面板 更改记录: --]] json = require ("json") mobox = require ("OILua_JavelinExt") m3 = require("oi_base_mobox") function BeforeSelectGood ( strLuaDEID ) local nRet, strRetInfo nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_CELL_NO" ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end local obj_attrs = json.decode( strRetInfo ) local cell_no = lua.Get_StrAttrValue( obj_attrs[1].value ) if ( cell_no == '' ) then return end local seg = lua.split( cell_no, '-' ) local cell_type = seg[1] local strCondition = "S_CELL_TYPE >= '"..cell_type.."'" local action = { { action_type = "open_data_query_dlg", value = { cls_name = "SKU", multi_choice = false, grid_style = "选择面板用", condition = strCondition, order = "S_ITEM_CODE" } } } nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) ) if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end end